<div class="flex-c hp100 border-box">
    <div class="search-box">
        <div class="condition-form">
            <el-form :inline="true" :model="formInline" ref="formInline" class="demo-form-inline">

                <el-form-item class="mr10" label="角色名称" prop="ROLE_NAME">
                    <el-input type="text" v-model.trim="formInline.ROLE_NAME" placeholder="请输入" clearable
                        @keyup.enter.native="search()"></el-input>
                </el-form-item>
                <el-form-item class="mr10" label="状态" prop="ZTBZ">
                    <el-select clearable filterable placeholder="请选择" v-model="formInline.ZTBZ">
                        <el-option key="1" label="正常" value="1">
                        </el-option>
                        <el-option key="0" label="暂停" value="0">
                        </el-option>
                    </el-select>
                </el-form-item>
                <el-form-item class="mr10">
                    <el-button :disabled="listLoading" type="primary" @click="search()" icon="el-icon-search"
                        size="mini">查询
                    </el-button>
                    <el-button type="warning" @click="resetForm('formInline')" icon="el-icon-close" size="mini">重置
                    </el-button>
                    <el-button type="success" @click="add()" icon="el-icon-plus" size="mini">新增
                    </el-button>

                </el-form-item>
            </el-form>

        </div>
    </div>
    <el-table :data="tableData" border class="wp100" empty-text="暂无相关数据" height="250" v-loading="listLoading">
        <el-table-column v-for="item in headers" :key="item.prop" :prop="item.prop" :label="item.label">
        </el-table-column>
        <el-table-column label="操作">
            <template slot-scope="scope" v-if="scope.row.ROLE_ID!=1">
                <el-button type="text" @click="editRow(scope.row)">修改</el-button>
                <el-button type="text" class="color-danger" @click="deleteRow(scope.row)">删除</el-button>
            </template>
        </el-table-column>
    </el-table>
    <pagination v-show="tableData.length>0" :total="listQuery.totalNum" :page.sync="listQuery.start"
        :limit.sync="listQuery.pageSize" @pagination="getList()" />



    <el-dialog title="角色" :visible.sync="dialogVisible" top="10px" width="60%" :close-on-click-modal="false">
        <div class="mb30">
            <el-form onsubmit="return false;" size="mini" label-width="80px" class="condition-form" :model="editInfo"
                :rules="rules" ref="buildData">
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="角色" prop="ROLE_NAME">
                            <el-input type="text" placeholder="请输入内容" v-model.trim="editInfo.ROLE_NAME" clearable />
                        </el-form-item>
                    </el-col>
                    <el-col :span="24">
                        <el-form-item label="页面权限" prop="YMQX">
                            <div class="text-r">
                                <el-checkbox v-model="checked" @change="changeSelect">全选</el-checkbox>

                            </div>
                            <el-checkbox-group v-model="editInfo.YMQX">
                                <el-table :data="ymqx_list" style="width: 100%" border>
                                    <el-table-column prop="title" label="页面名称">
                                    </el-table-column>
                                    <el-table-column label="权限">
                                        <template slot-scope="scope">
                                            <el-checkbox :label="scope.row.ID">{{scope.row.ID}}</el-checkbox>
                                        </template>
                                    </el-table-column>
                                </el-table>
                            </el-checkbox-group>
                        </el-form-item>
                    </el-col>
                    <el-col :span="24">
                        <el-form-item label="数据权限" prop="ZKQX">

                            <el-select clearable filterable placeholder="请选择" v-model="editInfo.ZKQX" class="wp100"
                                multiple>
                                <el-option v-for="item in ZK_LIST" :key="item.ZKID+''" :label="item.ZKMC"
                                    :value="item.ZKID+''">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>

                </el-row>
            </el-form>

        </div>
        <span slot="footer" class="dialog-footer">
            <el-button @click="dialogVisible = false">取 消</el-button>
            <el-button type="primary" @click="sure" :loading="saveLoading">确 定</el-button>
        </span>
    </el-dialog>



</div>